wayland: selectively cancel key repeat on key release
authorDan Torop <dant@pnym.net>
Thu, 13 Apr 2017 14:37:22 +0000 (10:37 -0400)
committerOlivier Fourdan <ofourdan@redhat.com>
Fri, 2 Jun 2017 17:13:03 +0000 (19:13 +0200)
commita23ad61a25404ee7e8fe5492008365b76e4b5965
tree62cd116f13f63293691cc518639010ff6cb84efa
parent24f9d2909393b8a2267e30d3f8b6e31d6aaee850
wayland: selectively cancel key repeat on key release

Under Wayland, when multiple keys are pressed and the user releases a
key, key repeat should continue unless the key released is the one
currently repeating.

In the case of:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key2 repeat
- key2 release

The behavior should be to cancel keyboard repeat, though key1 is still
held down. This is consistent with prior X11/XWayland behavior.

The following also must work:

- key1 press
- key2 press
- key2 release
- key2 press
- key1 release
- key2 should continue to repeat

The fix for bug #778019 should continue to work:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key1 release
- key2 should repeat

The choice to change the counter nkeys to the flag repeat_active
helps to solve the second test case.

https://bugzilla.gnome.org/show_bug.cgi?id=781285
gdk/wayland/gdkdevice-wayland.c